<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('contract列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <input type="hidden" name="status" value="2">
                    <ul>
                        <li>
                            <label>订单号：</label>
                            <input type="text" name="insuranceNumber"/>
                        </li>
                        <li>
                            <label>投保日期：</label>
                            <input type="text" class="time-input" placeholder="请选择投保日期" name="insuredDate"/>
                        </li>
                        <!--                            <li>-->
                        <!--                                <label>生效日期：</label>-->
                        <!--                                <input type="text" class="time-input" placeholder="请选择生效日期" name="startDate"/>-->
                        <!--                            </li>-->
                        <!--                            <li>-->
                        <!--                                <label>失效日期：</label>-->
                        <!--                                <input type="text" class="time-input" placeholder="请选择失效日期" name="endingDate"/>-->
                        <!--                            </li>-->
                        <!--                            <li>-->
                        <!--                                <label>业务员代码：</label>-->
                        <!--                                <input type="text" name="userStaffCode"/>-->
                        <!--                            </li>-->
                        <li>
                            <label>业务员姓名：</label>
                            <input type="text" name="userName"/>
                        </li>
                        <li>
                            <label>投保人姓名：</label>
                            <input type="text" name="applicantName"/>
                        </li>
                        <!--                            <li>-->
                        <!--                                <label>投保人证件类型：</label>-->
                        <!--                                <select name="applicantIdType" th:with="type=${@dict.getType('id_type')}">-->
                        <!--                                    <option value="">所有</option>-->
                        <!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
                        <!--                                </select>-->
                        <!--                            </li>-->
                        <!--                            <li>-->
                        <!--                                <label>投保人证件号：</label>-->
                        <!--                                <input type="text" name="applicantId"/>-->
                        <!--                            </li>-->
                        <!--                            <li>-->
                        <!--                                <label>投保人国籍：</label>-->
                        <!--                                <select name="applicantNationality" th:with="type=${@dict.getType('nationality')}">-->
                        <!--                                    <option value="">所有</option>-->
                        <!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
                        <!--                                </select>-->
                        <!--                            </li>-->
                        <!--                            <li>-->
                        <!--                                <label>投保人现住址：</label>-->
                        <!--                                <input type="text" name="applicantSite"/>-->
                        <!--                            </li>-->
                        <li>
                            <label>被保人姓名：</label>
                            <input type="text" name="recognizeeName"/>
                        </li>
                        <!--                            <li>-->
                        <!--                                <label>被保人证件类型：</label>-->
                        <!--                                <select name="recognizeeIdType" th:with="type=${@dict.getType('id_type')}">-->
                        <!--                                    <option value="">所有</option>-->
                        <!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
                        <!--                                </select>-->
                        <!--                            </li>-->
                        <!--                            <li>-->
                        <!--                                <label>被保人证件号：</label>-->
                        <!--                                <input type="text" name="recognizeeId"/>-->
                        <!--                            </li>-->
                        <!--                            <li>-->
                        <!--                                <label>被保人国籍：</label>-->
                        <!--                                <select name="recognizeeNationality" th:with="type=${@dict.getType('nationality')}">-->
                        <!--                                    <option value="">所有</option>-->
                        <!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
                        <!--                                </select>-->
                        <!--                            </li>-->
                        <!--                            <li>-->
                        <!--                                <label>被保人现住址：</label>-->
                        <!--                                <input type="text" name="recognizeeSite"/>-->
                        <!--                            </li>-->
                        <!--                            <li>-->
                        <!--                                <label>险种编码：</label>-->
                        <!--                                <input type="text" name="insuranceCode"/>-->
                        <!--                            </li>-->
                        <li>
                            <label>险种名称：</label>
                            <input type="text" name="insuranceName"/>
                        </li>
                        <!--                            <li>-->
                        <!--                                <label>保费：</label>-->
                        <!--                                <input type="text" name="insuranceExpense"/>-->
                        <!--                            </li>-->
                        <!--                            <li>-->
                        <!--                                <label>保额：</label>-->
                        <!--                                <input type="text" name="insuranceQuota"/>-->
                        <!--                            </li>-->
                        <!--                            <li>-->
                        <!--                                <label>合同状态：</label>-->
                        <!--                                <input type="text" name="status"/>-->
                        <!--                            </li>-->
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('insurance:review:newCheck')}]];
    var removeFlag = [[${@permission.hasPermi('insurance:contract:remove')}]];
    var applicantIdTypeDatas = [[${@dict.getType('id_type')}]];
    var applicantNationalityDatas = [[${@dict.getType('nationality')}]];
    var recognizeeIdTypeDatas = [[${@dict.getType('id_type')}]];
    var recognizeeNationalityDatas = [[${@dict.getType('nationality')}]];
    var prefix = ctx + "insurance/review";

    $(function() {
        var options = {
            url: prefix + "/list",
            updateUrl: prefix + "/newCheck/{id}",
            modalName: "合同信息",
            columns: [{
                checkbox: false
            },
                {
                    field: 'id',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'insuranceNumber',
                    title: '订单号'
                },
                {
                    field: 'insuredDate',
                    title: '投保日期'
                },
                {
                    field: 'startDate',
                    title: '生效日期'
                },
                {
                    field: 'endingDate',
                    title: '失效日期'
                },
                {
                    field: 'userStaffCode',
                    title: '业务员代码',
                    visible: false
                },
                {
                    field: 'userName',
                    title: '业务员姓名'
                },
                {
                    field: 'applicantName',
                    title: '投保人姓名'
                },
                {
                    field: 'applicantIdType',
                    title: '投保人证件类型',
                    visible: false,
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(applicantIdTypeDatas, value);
                    }
                },
                {
                    field: 'applicantId',
                    title: '投保人证件号',
                    visible: false
                },
                {
                    field: 'applicantNationality',
                    title: '投保人国籍',
                    visible: false,
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(applicantNationalityDatas, value);
                    }
                },
                {
                    field: 'applicantSite',
                    title: '投保人现住址',
                    visible: false
                },
                {
                    field: 'recognizeeName',
                    title: '被保人姓名'
                },
                {
                    field: 'recognizeeIdType',
                    title: '被保人证件类型',
                    visible: false,
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(recognizeeIdTypeDatas, value);
                    }
                },
                {
                    field: 'recognizeeId',
                    title: '被保人证件号',
                    visible: false
                },
                {
                    field: 'recognizeeNationality',
                    title: '被保人国籍',
                    visible: false,
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(recognizeeNationalityDatas, value);
                    }
                },
                {
                    field: 'recognizeeSite',
                    title: '被保人现住址',
                    visible: false
                },
                {
                    field: 'insuranceCode',
                    title: '险种编码',
                    visible: false
                },
                {
                    field: 'insuranceName',
                    title: '险种名称'
                },
                {
                    field: 'insuranceExpense',
                    title: '保费',
                    visible: false
                },
                {
                    field: 'insuranceQuota',
                    title: '保额',
                    visible: false
                },
                // {
                //     field: 'status',
                //     title: '合同状态'
                // },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.checkFull(\'' + row.id + '\')"><i class="fa fa-check"></i>进入</a> ');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>